package com.yuyou.fn.platform.service;

import com.github.wens.framework.service.ISuperService;
import com.yuyou.fn.platform.entity.Oauth;

import java.util.List;

/**
 *
 * Oauth 表数据服务层接口
 *
 */
public interface IOauthService extends ISuperService<Oauth,Long> {


    Oauth findByRoleOpenId(Integer role , String openId);

    void saveOauth(Integer role , Long userId, String openId, Integer platform);

    void unbind(String openId, Long userId, int role);

    void unbind(String openId,int role);

    void deleteByUserIdRole(Long userId,int role);

    Oauth findByUserId(Long userId);

    void updateUserId(Long userId , String openId, Integer platform);

    List<Oauth> findByUserIdRole(long userId, int role);
}